/*
 * Copyright (c) 2008, Xiong Yingfei, the University of Tokyo
 * All rights reserved.
 */
package ac.jp.u_tokyo.SyncLib.tests;

import ac.jp.u_tokyo.SyncLib.IDSync;
import ac.jp.u_tokyo.SyncLib.Sync;
import ac.jp.u_tokyo.SyncLib.SyncFactory;
import ac.jp.u_tokyo.SyncLib.graphCombinator.GraphCombinatorFactory;

public class GraphCombinatorByDoubleIDSync extends IDSyncTest
{

	@Override
	protected Sync createBackwardSync()
	{
		GraphCombinatorFactory f = new GraphCombinatorFactory();
		f.setParaVars("a", "b");
		f.setOtherVars("c");
		f.setInitialValues(null, null);
		f.connectSync(new SyncFactory() {

			public Sync create()
			{
				return new IDSync(false);
			}
			
		}, "c", "b");
		f.connectSync(new SyncFactory() {

			public Sync create()
			{
				return new IDSync(false);
			}
			
		}, "a", "c");
		return f.create();

	}

	@Override
	protected Sync createForwardSync()
	{
		GraphCombinatorFactory f = new GraphCombinatorFactory();
		f.setParaVars("a", "b");
		f.setOtherVars("c");
		f.setInitialValues(null, null);
		f.connectSync(new SyncFactory() {

			public Sync create()
			{
				return new IDSync(true);
			}
			
		}, "a", "c");
		f.connectSync(new SyncFactory() {

			public Sync create()
			{
				return new IDSync(true);
			}
			
		}, "c", "b");
		return f.create();
	}

}
